<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>ExtTop - Desktop Sample App</title>

    <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
    <link rel="stylesheet" type="text/css" href="css/desktop.css" />
    <link rel="stylesheet" type="text/css" href="Ext.ux.IconManager/IconsCss.css" />

    <!-- GC -->
 	<!-- LIBS -->
 	<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
 	<!-- ENDLIBS -->

    <script type="text/javascript" src="../../ext-all-debug.js"></script>

    <!-- DESKTOP -->
    <script type="text/javascript" src="js/StartMenu.js"></script>
    <script type="text/javascript" src="js/TaskBar.js"></script>
    <script type="text/javascript" src="js/Desktop.js"></script>
    <script type="text/javascript" src="js/App.js"></script>
    <script type="text/javascript" src="js/Module.js"></script>
	<script type="text/javascript" src="Ext.ux.IconManager/utils.js"></script>
	<script type="text/javascript" src="Ext.ux.IconManager/CookieStateProvider.js"></script>
	<script type="text/javascript" src="Ext.ux.IconManager/Ext.ux.IconManager.js"></script>
    <script type="text/javascript" src="sample.js"></script>
</head>
<body scroll="no">

<div id="x-desktop">
    <a href="http://extjs.com" target="_blank" style="margin:5px; float:right;"><img src="images/powered.gif" /></a>
	<div id="clear_cache_button"></div>
    <dl id="x-shortcuts">
        
    </dl>
</div>

<div id="ux-taskbar">
	<div id="ux-taskbar-start"></div>
	<div id="ux-taskbuttons-panel"></div>
	<div class="x-clear"></div>
</div>
<script language="JavaScript">
	Ext.onReady(function(){
		
		new Ext.ux.Desktop.IconsManager({
			desktop: MyDesktop,
			autoSort: false,
			useDomIcons: false,
			iconsSelector: 'dt',
			iconsArea: 'dl',
			iconsSelectionElement : 'a',
			desktopEl: '#x-desktop',
			cache: true,
			listeners: {
				iconSelect : function(c, r){
					//console.log(this.selectedIconsArray);
				},
				iconDeselect : function(){
					//console.log(this.selectedIconsArray);
				},
				iconMove : function(c, i){
					//console.log(i);
				}
			},
			stateManager: new Ext.ux.Desktop.IconsStateProvider({
				provider: new Ext.state.CookieProvider({
			    	expires: new Date(new Date().getTime()+(1000*60*20)),
					path: "/stas/ext/examples/idesktop/desktop.html"
			   	})
			})
			,items: [{
				id: 'grid-win_',
				icon: 'images/grid48x48.png',
				x: '400px',
				y: '200px',				
				enable: true,
				text: 'grid',
				launchModuleId: 'grid-win',
				template: 
				    '<a href="#"><img src="{icon}" />' +
	            	'<div>--{text}--</div></a>'
			}, {
				id: 'win-win_',
				icon: 'images/im48x48.png',
				x: 1,
				y: 0,				
				enable: true,
				launchModuleId: 'acc-win',
				text: 'window'
			}, {
				id: 'bogus-win-shortcut',
				icon: 'images/bogus48x48.png',
				x: 0,
				y: 0,				
				enable: true,
				launchModuleId: 'bogus4',
				text: 'Bogus Window'
			}, {
				id: 'tab-win_',
				icon: 'images/tab48x48.png',
				x: 4,
				y: 1,				
				enable: true,
				launchModuleId: 'tab-win',
				text: 'Tab Window'
			}],
			basicTemplate: 
			    '<a href="#"><img src="{icon}" />' +
            	'<div>{text}</div></a>'			
		});
		
		
	});
</script>
</body>
</html>
